home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 3 / United Public Domain Gold 3.iso / c / mp.readme < prev    next >
Text File  |  1993-08-31  |  15KB  |  278 lines

  1. Short: MPEG player for ECS/AGA/OpalVision/PicassoII, needs 020+,2MB,OS2.04
  2.  
  3. ---
  4. mp (mpeg_play) is a MPEG software decoder for the Commodore Amiga computer. It
  5. is derived from the UNIX/X11 MPEG decoder version 2.0 by the Berkeley Plateau
  6. Research Group. Many thanks to Lawrence A. Rowe, Ketan Patel and Brian Smith
  7. for publishing that decoder, without them I wouldn't even know how MPEG works.
  8.  
  9. Since the least release I found a few things where the player could get
  10. improved. You may enjoy a few new output modes as well as generally faster
  11. playback speed, especially with the gray display modes. If that's not enough
  12. you can now split an MPEG into individual IFF 24bit frames and use your
  13. favourite ANIM rendering tool. ANIMs can be played back much faster and you
  14. can use more sophisticated rendering algorithms as these aren't computed in
  15. real-time, ANIMs however require much more disk space and, for fast play back,
  16. you may need to load them completely into memory. As an example, the tennis.mpg
  17. animation is about 1.2MByte but when converted to HAM6 ANIM-7 format it takes
  18. 9.4MByte. On the other hand the MPEG is not much faster than 1 fps on my A3000
  19. but the ANIM plays back at 16..20 fps using ViewTek1.05.
  20.  
  21. When I added the HAM8 display mode I detected an unfortunate bug in the 39.106
  22. kickstart which is used in most A1200s and A4000s. The player uses a simple
  23. workaround but which makes the HAM8 mode slower than it already is, sorry.
  24.  
  25. Again, many thanks to all the people that contributed with ideas, code and
  26. time to test the player on as many configurations as possible.
  27.  
  28. ---
  29. Requirements for the 1.03 version (same as for 1.02):
  30.  
  31. - 68020 or higher CPU. Some thoughts went into that decision since it rules out
  32.   many people in viewing MPEGs but IMHO a 68000 is way too slow to decode MPEG
  33.   at a useful rate. Even an 68030/25MHz is quite slow, at least with this
  34.   program.
  35.  
  36. - about 2MB memory. The program uses table lookups for some functions,
  37.   especially the HAM rendering code and the hybrid dithering need a large
  38.   table. Other display and dithering options can live with less memory.
  39.  
  40. - AmigaOS 2.0 or higher. Well, everyone should have updated to AmigaOS2.0.
  41.   Compatibility to AmigaOS1.3 would have added more special cases. I also
  42.   believe that people who can afford an accelerated Amiga have no problems
  43.   with that requirement and it made some functions a bit easier.
  44.  
  45. ---
  46. How to use the program:
  47.  
  48. mp has to be run from the CLI/Shell. Following the UNIX tradition it accepts
  49. command line parameters in the form 'programname' '-option...' 'input-file'
  50. and reads from standard input when no input filename is given. So if you
  51. run mp without arguments it will appear to do nothing. But in reality it tries
  52. to read an MPEG bitstream from the keyboard. Since that is a bit difficult to
  53. enter you should end input by hitting CTRL-\ which sends an EOF condition.
  54.  
  55. valid options are:
  56.  
  57. -display displayname  this has no function and is a remnant from the X11 code
  58.                       that allowed to specify the name of the X server/screen
  59.                       to use.
  60.  
  61. -dither dithermode    selects a dither and/or display mode. Some displays types
  62.                       need special dithering so this has been combined into one
  63.                       option. More about the possible dithermodes below.
  64.  
  65. -loop                 causes the player to repeat an animation for ever. You
  66.                       have to break it with CTRL-C.
  67.  
  68. -eachstat             this would produce verbose statistics information.
  69.                       Calculating the statistics however slows down the player
  70.                       and thus has been #ifdef'ed out.
  71.  
  72. -no_display           dithers, but does not display, usually used for testing
  73.                       and timing purposes.
  74.  
  75. -shmem_off            again a remnant of the X11 player with no function
  76.  
  77. -quiet                the program normally writes the frame number for each
  78.                       frame to the standard output which can be used to pause
  79.                       the player by hitting any key in the shell window. The
  80.                       -quiet option suppresses that output.
  81.  
  82. -l_range num
  83. -cr_range num
  84. -cb_range num         All paletted display modes use a 'color cube' to fill the
  85.                       palette. The default is to use 16 luminance values
  86.                       (-l_range), 4 red values (-cr_range) and 4 blue values
  87.                       (-cb_range). For some movies this can produce bad colors,
  88.                       you can change the resolution of the color cube with
  89.                       these options, the total number of colors however cannot
  90.                       be larger than 256.
  91.                       As of 1.03 of the player a smaller color cube is used
  92.                       for the EHB display, only 6 luminance, 3 red and 3 blue
  93.                       values are used. The smaller palette yields more exact
  94.                       colors.
  95.  
  96. -nob                  causes the player to ignore and not display B (bothway
  97.                       interpolated) frames.
  98.  
  99. -nop                  causes the player to ignore and not display P (predicted)
  100.                       frames.
  101.  
  102. -saveiff filespec     new for 1.03: causes the player to save all frames to
  103.                       disk in the IFF24 format so that you can render ANIMs
  104.                       with your favourite image processing tool.
  105.                       filespec can be a simple filename, in this case the frame
  106.                       number is appended to generate the filenames for the
  107.                       individual frames. You can also use a pattern like
  108.                       prefix%%%suffix, the sequence of % characters gets
  109.                       replaced by the frame number (with possible leading
  110.                       zeroes to get equal length filenames).
  111.  
  112.                       Example:
  113.                       -saveiff micky.iff. generates micky.iff.1,micky.iff.2,..
  114.                       -saveiff micky.%%.iff generates micky.01.iff,...
  115.  
  116.                       'filename%' is identical to just 'filename'.
  117.  
  118. Dither and display options:
  119.  
  120. -dither ordered       use simple ordered dithering
  121. -dither ordered2      a faster ordered dither. This is the default.
  122. -dither mbordered     ordered dithering at the macroblock level.
  123. -dither fs4           Floyd-Steinberg dithering with 4 error values propagated
  124. -dither fs2           Floyd-Steinberg dithering with 2 error values propagated
  125. -dither fs2fast       a faster fs2
  126. -dither hybrid        Hybrid dithering, a combination of ordered dithering for
  127.                       luminance and fs2 dithering for chrominance. Errors are
  128.                       not propagated properly.
  129. -dither hybrid2       Hybrid dithering with error propagation among pixels.
  130. -dither 2x2           A dithering technique using a 2x2 pixel area for each
  131.                       pixel. The image displayed is 4 times larger than the
  132.                       original image encoded. Random error terms are added to
  133.                       each pixel to break up contours and gradients.
  134. -dither gray          Grayscale dithering. The image is dithered into 16
  135.                       grayscales. Chrominance information is thrown away.
  136. -dither gray8         Grayscale dithering with 256 grayscales (AGA only).
  137. -dither color         'True' color display with 4 bits luminance and 2*2 bits
  138.                       for chrominance.
  139. -dither ham6          'True' color display using HAM approximation. For each
  140.                       pixel either red, green or blue are set correctly and
  141.                       the other color components are the same as the pixel to
  142.                       the left. As the name implies this uses the 6bit HAM mode
  143.                       and is limited to 4096 possible colors.
  144. -dither none          no dithering is done, no image is displayed. Used to time
  145.                       the decoding process.
  146. -dither mono          Floyd-Steinberg dithering in black and white.
  147. -dither threshold     Simple thresholding in black and white.
  148.  
  149. and new for 1.03
  150. -dither ham8          'True' color display using HAM approximation. In HAM8
  151.                       mode you have a 18bit color palette for a maximum of 256k
  152.                       colors produced by mp. This mode produces finer gradients
  153.                       than ham6 but it is significantly slower.
  154.                      
  155.  
  156. All above modes except for none, mono, threshold, gray, gray8, color, ham6
  157. and ham8 are paletted modes. On OCS/ECS machines this will produce an
  158. EXTRA_HALFBRITE display for the maximum number of colors. On AGA machines a
  159. 256 color screen is used which produces a mucher better display. As written
  160. above, the gray8 mode is only available on AGA machines. The selection between
  161. gray and gray8 is not done automatic because the 16 graylevel mode is somewhat
  162. faster and some AGA users might want to trade display quality for speed.
  163.  
  164. The player supports four 24bit displays: the OpalVision board, the PicassoII
  165. and the Retina graphics boards plus everything supported by the EGS libraries.
  166. The options
  167.  
  168. -dither opal15         and
  169. -dither opal24         generate a 15bit or 24bit display on the OpalVision.
  170.                        Playback speed is somewhat slower than for the native
  171.                        Amiga graphic. This requires the opal.library to be
  172.                        present in the LIBS: directory.
  173.  
  174. -dither village24      generates a 24bit display on the PicassoII board. This
  175.                        requires the PicassoII software to be installed
  176.                        properly. You don't need to redirect the Workbench to
  177.                        the PicassoII board nor use the ChangeScreen commodity
  178.                        as the player directly talks to the PicassoII driver
  179.                        software. The player will open a display as large as
  180.                        necessary which will be 320x240 for most MPEG files if
  181.                        you have the latest Picasso software. I talked to the
  182.                        VillageTronic people to support a 352x288 mode as well
  183.                        which is the standard resolution for full screen MPEGs
  184.                        (in PAL).
  185.  
  186.                        The player cannot be retargeted by the Picasso's
  187.                        Intuition driver, so the standard dither modes will
  188.                        get the native Amiga display.
  189.  
  190. new for 1.03
  191. -dither retina24       generates a 24bit display on the Retina board. This
  192.                        requires the Retina software to be installed properly.
  193.                        The player was tested with version 1.3 of the Retina
  194.                        software. The player uses the standard screen dimensions
  195.                        for the 24bit display. You can change the resolution
  196.                        with the Retina software, you will probably prefer the
  197.                        lowest resolution to get the largest image size on the
  198.                        screen.
  199.  
  200.                        The player will be retargeted by the Retina software
  201.                        when using the standard dither modes, however, since
  202.                        the Retina software does not report that the display
  203.                        memory is non-standard you have to tell the Retina
  204.                        driver to update the display from chip memory
  205.                        continously to see a picture under the emulation.
  206.                        Most people will prefer the 24bit display using the
  207.                        retina24 dither mode though.
  208.  
  209. -dither egs24          generates a 'true color' display on any hardware
  210.                        supported by the EGS libraries. Dithering and rendering
  211.                        is done by EGS while the player just supplies the 24bit
  212.                        raw data. If you have an EGS supported 24bit board this
  213.                        means you will see full 24bit. In any case the _default_
  214.                        EGS screen is used, you can choose the dimensions and
  215.                        depth with the EGS preferences tools.
  216.  
  217.                        Warning! EGS does not yet support to send raw 24bit data
  218.                        to the libraries rendering routines except for single
  219.                        pixels. To improve speed the player fakes a EGS Bitmap
  220.                        structure that points to the internal 24bit data created
  221.                        by the MPEG decoding stage. This works well with the
  222.                        current implementation of EGS but may fail in the
  223.                        future. A future version of EGS however will support
  224.                        rendering of 24bit data arrays and I intend to update
  225.                        the player code as soon as the new EGS documentation
  226.                        because publically available.
  227.  
  228. Example:
  229.  
  230. mp -dither ham6 jet.mpg
  231.  
  232. will play back the MPEG movie from the file jet.mpg and use a HAM display.
  233.  
  234. mp -loop -dither village24 micky.mpg
  235.  
  236. will play back the file micky.mpg endlessly on the PicassoII board until
  237. CTRL-C is hit.
  238.  
  239. ---
  240. Playback speeds:
  241.  
  242. MPEG is a very CPU intensive way of compressing and decompressing digital
  243. video data. An Amiga A3000 achieves a rate of about 3.7 frames per second for
  244. average MPEG streams of 160x120 pixels per frame that were encoded with
  245. the XING encoder. Better _encoders_ can get better compression and streams
  246. from these encoders can be played back a bit faster.
  247.  
  248. MPEG movie        |  Resolution           |  Compression ratio  |  Frame rate
  249. ----------------------------------------------------------------------------
  250. micky.mpg         |  160x120              |  19.4               |  3.69
  251. moglie.mpg        |  160x120              |  23.8               |  3.80
  252. flight.mpg        |  160x120              |  20.8               |  3.77
  253. birdisba.mpg      |  160x120              |  27.6               |  4.36
  254. BigE_accel.mpg    |  176x144              |  41.1               |  4.16
  255. tennis.mpg        |  352x240              |  30.5               |  1.13
  256. jet.mpg           |  128x96               |  48.3               |  8.06
  257.  
  258. The frame rates were measured on an A3000/25MHz with static column RAMs on a
  259. PAL monitor using the ham6 dither mode. NTSC machines may show slightly
  260. different timing due to different frame times (50Hz vs. 60Hz) and the need to
  261. synchronize a double buffered display.
  262.  
  263. ---
  264. The 1.03 version of the player has been finished at the Amiga User Meeting in
  265. Bielefeld/Germany on August 28-29th 1993. Just a few hours later Harv Laser
  266. reported a bug in the OpalVision 24bit output, so there is a 1.03fix release.
  267. The length of the fixed executable is 115840 Bytes and yields the VERSION
  268. string:
  269.  
  270. mpeg_play 1.03fix
  271. (Bielefeld meeting final)
  272.  
  273. Please send any suggestions and bug reports to me. I can be reached via E-Mail
  274. as mlelstv@mpifr-bonn.mpg.de. People with Internet access can also find me
  275. often in the IRC (Internet Relay Chat) channels #amiga and #amigager.
  276.  
  277. Michael van Elst
  278.